<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>table</title>
</head>
<body>
    <p>表格是显示二维数据的重要标签</p>
    <hr>
    <p>两行三列的表格</p>
    <!-- border显示表格线，已被淘汰 -->
    <table border="1">
        <tr>
            <td>单元格</td>
            <td>单元格</td>
            <td>单元格</td>
        </tr>
        <tr>
            <td>单元格</td>
            <td>单元格</td>
            <td>单元格</td>
        </tr>
    </table>

    <hr>
    <table border="1">
        <caption>学生表</caption>
        <thead>
            <tr>
                <!-- &nbsp;表示空格 -->
                 <td>&nbsp;</td>
                 <!-- th用于显示表头 -->
                 <th>学号</th>
                 <th>姓名</th>
                 <th>总分</th>
                 <th>排名</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <th>1</th>
                <td>10003</td>
                <td>张三</td>
                <td>100</td>
                <td>1</td>
            </tr>
            <tr>
                <th>2</th>
                <td>10002</td>
                <td>李四</td>
                <td>90</td>
                <td>2</td>
            </tr>
            <tr>
                <th>3</th>
                <td>10001</td>
                <td>王五</td>
                <td>80</td>
                <td>3</td>
            </tr>
        </tbody>
        <footer>
            <tr>
                <th colspan="5">总分：</th>
            </tr>
        </footer>
    </table>
    <hr>
    <!-- 将表格以列分组 -->
     <table border="1">
        <colgroup>
            <!-- 第一组为三个 -->
            <col span="3">
            <!-- 第二组为两个 -->
            <col span="2">
        </colgroup>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
        <tr>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组1</td>
            <td>分组2</td>
            <td>分组2</td>
        </tr>
     </table>
</body>
</html>